<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Short Names</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Short Names' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../inform7n.html">Inform7</a></li><li><a href="index.html">runtime</a></li><li><a href="index.html#2">Chapter 2: Emission</a></li><li><b>Short Names</b></li></ul></div>
<p class="purpose">To compile the "short name" and "capitalised short name" properties.</p>

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>All versions of Inform, even Basic Inform, support the "short name" property.
The "capitalised short name" variant property, though, may not always exist.
It can be conjured into being by calling this function:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">property</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P_cap_short_name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">property</span><span class="plain-syntax"> *</span><span class="function-syntax">ShortNames::cap_short_name_property</span><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">P_cap_short_name</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">property_iname</span><span class="plain-syntax"> = </span><a href="2-hrr.html#SP11" class="function-link"><span class="function-syntax">Hierarchy::find</span></a><span class="plain-syntax">(</span><span class="constant-syntax">CAPSHORTNAME_HL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">P_cap_short_name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ValueProperties::new_nameless_using</span><span class="plain-syntax">(</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">K_text</span><span class="plain-syntax">, </span><a href="5-kc.html#SP2" class="function-link"><span class="function-syntax">RTKindConstructors::kind_package</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_object</span><span class="plain-syntax">), </span><span class="identifier-syntax">property_iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-hrr.html#SP17" class="function-link"><span class="function-syntax">Hierarchy::make_available</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">property_iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">P_cap_short_name</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>But in Basic Inform projects, that function may never be called, leaving
<span class="extract"><span class="extract-syntax">P_cap_short_name</span></span> null. This is a problem for code in <a href="../BasicInformKit/index.html" class="internal">BasicInformKit</a>,
which assumes that this name means something. So in that contingency we
define it to be equivalent to regular short name, thus:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">ShortNames::compile_cap_short_name</span><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">P_cap_short_name</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">iname</span><span class="plain-syntax"> = </span><a href="2-hrr.html#SP11" class="function-link"><span class="function-syntax">Hierarchy::find</span></a><span class="plain-syntax">(</span><span class="constant-syntax">CAPSHORTNAME_HL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-emt.html#SP8" class="function-link"><span class="function-syntax">Emit::iname_constant</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">iname</span><span class="plain-syntax">, </span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="2-hrr.html#SP11" class="function-link"><span class="function-syntax">Hierarchy::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">SHORT_NAME_HL</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        </span><a href="2-hrr.html#SP17" class="function-link"><span class="function-syntax">Hierarchy::make_available</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>Most of the time the short name property holds text, in a straightforward
way: <span class="extract"><span class="extract-syntax">"blue hat"</span></span>, say. But if the property belongs to an object created as
part of an assembly, then its name needs to contain that of the object it
was assembled from: say <span class="extract"><span class="extract-syntax">"Marianne's blue hat"</span></span>, where <span class="extract"><span class="extract-syntax">"Marianne"</span></span> is the
name of the owner.
</p>

<p class="commentary">If, however, the short name for <span class="extract"><span class="extract-syntax">"Marianne"</span></span> varies &mdash; through the use of
an activity &mdash; then we want to respect that. So we don't give the name using
static text, but as a dynamic function, which first prints Marianne's name
through the usual apparatus, and then adds <span class="extract"><span class="extract-syntax">"'s blue hat"</span></span> afterwards. That
way, if Marianne changes her name to Emilia, the result will be
<span class="extract"><span class="extract-syntax">"Emilia's blue hat"</span></span>.
</p>

<p class="commentary">This function returns the name of the function to do this, and queues a compilation
request for it. <span class="extract"><span class="extract-syntax">capped</span></span> is <span class="extract"><span class="extract-syntax">TRUE</span></span> if the function is to be used in a capitalised
short name, and <span class="extract"><span class="extract-syntax">FALSE</span></span> for regular.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">short_name_notice</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">routine_iname</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">snn_iname</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">namee</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">inference_subject</span><span class="plain-syntax"> *</span><span class="identifier-syntax">after_subject</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">capped</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CLASS_DEFINITION</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">short_name_notice</span><span class="plain-syntax">;</span>

<span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="function-syntax">ShortNames::iname_for_short_name_fn</span><span class="plain-syntax">(</span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">inference_subject</span><span class="plain-syntax"> *</span><span class="identifier-syntax">subj</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">capped</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">short_name_notice</span><span class="plain-syntax"> *</span><span class="identifier-syntax">notice</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CREATE</span><span class="plain-syntax">(</span><span class="reserved-syntax">short_name_notice</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">routine_iname</span><span class="plain-syntax"> = </span><a href="2-hrr.html#SP12" class="function-link"><span class="function-syntax">Hierarchy::make_iname_in</span></a><span class="plain-syntax">(</span><span class="constant-syntax">SHORT_NAME_FN_HL</span><span class="plain-syntax">, </span><a href="5-ins.html#SP1" class="function-link"><span class="function-syntax">RTInstances::package</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">namee</span><span class="plain-syntax"> = </span><span class="identifier-syntax">I</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">after_subject</span><span class="plain-syntax"> = </span><span class="identifier-syntax">subj</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capped</span><span class="plain-syntax"> = </span><span class="identifier-syntax">capped</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">snn_iname</span><span class="plain-syntax"> = </span><a href="2-hrr.html#SP12" class="function-link"><span class="function-syntax">Hierarchy::make_iname_in</span></a><span class="plain-syntax">(</span><span class="constant-syntax">SHORT_NAME_PROPERTY_FN_HL</span><span class="plain-syntax">, </span><a href="5-ins.html#SP1" class="function-link"><span class="function-syntax">RTInstances::package</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">desc</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::new</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">desc</span><span class="plain-syntax">, </span><span class="string-syntax">"short name for "</span><span class="plain-syntax">); </span><span class="identifier-syntax">Instances::write</span><span class="plain-syntax">(</span><span class="identifier-syntax">desc</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Sequence::queue</span><span class="plain-syntax">(&amp;</span><a href="2-sn.html#SP4" class="function-link"><span class="function-syntax">ShortNames::compilation_agent</span></a><span class="plain-syntax">, </span><span class="identifier-syntax">STORE_POINTER_short_name_notice</span><span class="plain-syntax">(</span><span class="identifier-syntax">notice</span><span class="plain-syntax">), </span><span class="identifier-syntax">desc</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">snn_iname</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<ul class="endnotetexts"><li>The structure short_name_notice is private to this section.</li></ul>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>And here the function in question is compiled:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">ShortNames::compilation_agent</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">ShortNames::compilation_agent</span></span>:<br/><a href="2-sn.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">compilation_subtask</span><span class="plain-syntax"> *</span><span class="identifier-syntax">t</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">short_name_notice</span><span class="plain-syntax"> *</span><span class="identifier-syntax">notice</span><span class="plain-syntax"> = </span><span class="identifier-syntax">RETRIEVE_POINTER_short_name_notice</span><span class="plain-syntax">(</span><span class="identifier-syntax">t</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">data</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">instance</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Naming::object_this_is_named_after</span><span class="plain-syntax">(</span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">namee</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">packaging_state</span><span class="plain-syntax"> </span><span class="identifier-syntax">save</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Functions::begin</span><span class="plain-syntax">(</span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">routine_iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">NA</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Assertions::Assemblies::get_named_after_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">after_subject</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="2-sn.html#SP4_1" class="named-paragraph-link"><span class="named-paragraph">Print the owner's short name</span><span class="named-paragraph-number">4.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="2-ec.html#SP14" class="function-link"><span class="function-syntax">EmitCode::inv</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">PRINT_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::down</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">        </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_text</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="string-syntax">"'s "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::up</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="2-sn.html#SP4_2" class="named-paragraph-link"><span class="named-paragraph">Print the assembled object's name</span><span class="named-paragraph-number">4.2</span></a></span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><a href="2-ec.html#SP15" class="function-link"><span class="function-syntax">EmitCode::rtrue</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Functions::end</span><span class="plain-syntax">(</span><span class="identifier-syntax">save</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">save</span><span class="plain-syntax"> = </span><a href="2-ea.html#SP2" class="function-link"><span class="function-syntax">EmitArrays::begin_unchecked</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">snn_iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="2-ea.html#SP4" class="function-link"><span class="function-syntax">EmitArrays::iname_entry</span></a><span class="plain-syntax">(</span><a href="2-hrr.html#SP11" class="function-link"><span class="function-syntax">Hierarchy::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">CONSTANT_PACKED_TEXT_STORAGE_HL</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><a href="2-ea.html#SP4" class="function-link"><span class="function-syntax">EmitArrays::iname_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">routine_iname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="2-ea.html#SP5" class="function-link"><span class="function-syntax">EmitArrays::end</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">save</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4_1" class="paragraph-anchor"></a><b>&#167;4.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Print the owner's short name</span><span class="named-paragraph-number">4.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">notice</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">capped</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">porname</span><span class="plain-syntax"> = </span><a href="2-hrr.html#SP11" class="function-link"><span class="function-syntax">Hierarchy::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">PRINTORRUN_HL</span><span class="plain-syntax">);</span>

<span class="plain-syntax">        </span><a href="2-ec.html#SP14" class="function-link"><span class="function-syntax">EmitCode::inv</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">IFELSE_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::down</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP14" class="function-link"><span class="function-syntax">EmitCode::inv</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">PROPERTYARRAY_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::down</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">                </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="5-ki.html#SP1" class="function-link"><span class="function-syntax">RTKindIDs::weak_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_object</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="5-ins.html#SP1" class="function-link"><span class="function-syntax">RTInstances::value_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="2-hrr.html#SP11" class="function-link"><span class="function-syntax">Hierarchy::find</span></a><span class="plain-syntax">(</span><span class="constant-syntax">CAPSHORTNAME_HL</span><span class="plain-syntax">));</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::up</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP5" class="function-link"><span class="function-syntax">EmitCode::code</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::down</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">                </span><a href="2-ec.html#SP14" class="function-link"><span class="function-syntax">EmitCode::call</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">porname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::down</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">                    </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="5-ins.html#SP1" class="function-link"><span class="function-syntax">RTInstances::value_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                    </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="2-hrr.html#SP11" class="function-link"><span class="function-syntax">Hierarchy::find</span></a><span class="plain-syntax">(</span><span class="constant-syntax">CAPSHORTNAME_HL</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                    </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_number</span></a><span class="plain-syntax">(1);</span>
<span class="plain-syntax">                </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::up</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::up</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP5" class="function-link"><span class="function-syntax">EmitCode::code</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::down</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">                </span><a href="2-ec.html#SP14" class="function-link"><span class="function-syntax">EmitCode::call</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">porname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::down</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">                    </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="5-ins.html#SP1" class="function-link"><span class="function-syntax">RTInstances::value_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                    </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="2-hrr.html#SP11" class="function-link"><span class="function-syntax">Hierarchy::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">SHORT_NAME_HL</span><span class="plain-syntax">));</span>
<span class="plain-syntax">                    </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_number</span></a><span class="plain-syntax">(1);</span>
<span class="plain-syntax">                </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::up</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::up</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">        </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::up</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inter_name</span><span class="plain-syntax"> *</span><span class="identifier-syntax">psnname</span><span class="plain-syntax"> = </span><a href="2-hrr.html#SP11" class="function-link"><span class="function-syntax">Hierarchy::find</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">PRINTSHORTNAME_HL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-ec.html#SP14" class="function-link"><span class="function-syntax">EmitCode::call</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">psnname</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::down</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">K_value</span><span class="plain-syntax">, </span><a href="5-ins.html#SP1" class="function-link"><span class="function-syntax">RTInstances::value_iname</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::up</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-sn.html#SP4">&#167;4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP4_2" class="paragraph-anchor"></a><b>&#167;4.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Print the assembled object's name</span><span class="named-paragraph-number">4.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">SNAMES</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_THROUGH_WORDING</span><span class="plain-syntax">(</span><span class="identifier-syntax">j</span><span class="plain-syntax">, </span><span class="identifier-syntax">NA</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">TranscodeText::from_wide_string</span><span class="plain-syntax">(</span><span class="identifier-syntax">SNAMES</span><span class="plain-syntax">, </span><span class="identifier-syntax">Lexer::word_raw_text</span><span class="plain-syntax">(</span><span class="identifier-syntax">j</span><span class="plain-syntax">), </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">j</span><span class="plain-syntax">&lt;</span><span class="identifier-syntax">Wordings::last_wn</span><span class="plain-syntax">(</span><span class="identifier-syntax">NA</span><span class="plain-syntax">)) </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">SNAMES</span><span class="plain-syntax">, </span><span class="string-syntax">" "</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="2-ec.html#SP14" class="function-link"><span class="function-syntax">EmitCode::inv</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">PRINT_BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::down</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">        </span><a href="2-ec.html#SP8" class="function-link"><span class="function-syntax">EmitCode::val_text</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">SNAMES</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="2-ec.html#SP3" class="function-link"><span class="function-syntax">EmitCode::up</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">SNAMES</span><span class="plain-syntax">)</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="2-sn.html#SP4">&#167;4</a>.</li></ul>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="2-hnae.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-rm.html">1</a></li><li class="progresscurrentchapter">2</li><li class="progresssection"><a href="2-hrr.html">hrr</a></li><li class="progresssection"><a href="2-ni.html">ni</a></li><li class="progresssection"><a href="2-cu.html">cu</a></li><li class="progresssection"><a href="2-emt.html">emt</a></li><li class="progresssection"><a href="2-ec.html">ec</a></li><li class="progresssection"><a href="2-ea.html">ea</a></li><li class="progresssection"><a href="2-int.html">int</a></li><li class="progresssection"><a href="2-sv.html">sv</a></li><li class="progresssection"><a href="2-th.html">th</a></li><li class="progresssection"><a href="2-dv.html">dv</a></li><li class="progresssection"><a href="2-es.html">es</a></li><li class="progresssection"><a href="2-ic.html">ic</a></li><li class="progresssection"><a href="2-kd.html">kd</a></li><li class="progresssection"><a href="2-sc.html">sc</a></li><li class="progresssection"><a href="2-hnae.html">hnae</a></li><li class="progresscurrent">sn</li><li class="progresssection"><a href="2-gpr.html">gpr</a></li><li class="progresssection"><a href="2-ie.html">ie</a></li><li class="progresschapter"><a href="3-gm.html">3</a></li><li class="progresschapter"><a href="4-enc.html">4</a></li><li class="progresschapter"><a href="5-act.html">5</a></li><li class="progresschapter"><a href="6-bd.html">6</a></li><li class="progresschapter"><a href="7-cg.html">7</a></li><li class="progressnext"><a href="2-gpr.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

